﻿using System.Windows;
using DevExpress.Xpf.Editors;

namespace CTS.App.Com.Resources.Themes
{
    /// <summary>
    /// Interaction logic for TextEdit.xaml
    /// </summary>
    public partial class TextEditEvent : ResourceDictionary
    {
        public TextEditEvent()
        {
            InitializeComponent();
        }

        private void EventGotFocus(object sender, RoutedEventArgs e)
        {
            if (e.Source == null || e.Source.GetType() != typeof(TextEdit)) return;
            var tb = e.Source as TextEdit;
            Application.Current.Properties["TextEdit.Text"] = tb.Text;
        }
    }
}
